#pragma once
#include "afxwin.h"
#include "afxcmn.h"

class CmyMemoryDlg : public CDialog
{
public:

	CmyMemoryDlg(CWnd* pParent = NULL);

	enum {IDD = IDD_MYMEMORY_DIALOG};

	virtual BOOL DestroyWindow();

protected:

	HICON m_hIcon;

	HMENU m_MainMenu;

	CButton Btn_OK;
	CButton Btn_Cancel;

	CGridListCtrlGroups m_ListProcess;
	CGridListCtrlGroups m_ListModule;
	CGridListCtrlGroups m_ListThread;
	CGridListCtrlGroups m_ListWindow;

	char m_Log[1024];

	virtual BOOL OnInitDialog();

	virtual BOOL PreTranslateMessage(MSG *pMsg);

	virtual int EnumProcess();

	virtual int EnumModule(DWORD Pid);

	virtual int EnumThread(DWORD Pid);

	virtual int EnumWindow(DWORD Pid);

	static BOOL __stdcall EnumWindowsProc(HWND hHandle, LPARAM lParam);

	virtual ProcessIt FindInProcessQue(ProcessQue *Que, DWORD Pid, char *szEXE);

	virtual dwTDIt FindInPauseTDQue(DWORD tId);

	virtual int UpdateThreadTime();

	virtual int myGetFileVersion(char *FilePath, char *Version, int vSize);

	virtual int myGetFileSize(char *FilePath, DWORD *fSize);

	virtual int OpenOperateMenu(int MenuId, int Line = -1);

	virtual int GetLineText(CGridListCtrlGroups *Ctrl, char *Buf, int bSize);

	virtual int PostText(char *Buf);

	virtual void DoDataExchange(CDataExchange* pDX);

	afx_msg LRESULT OnMessage(WPARAM wParam, LPARAM lParam);
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnPaint();
	afx_msg void OnMenuMainProcessModule();
	afx_msg void OnMenuMainProcessThread();
	afx_msg void OnMenuMainProcessWindow();
	afx_msg void OnMenuSetProcessDspsystem();
	afx_msg void OnMenuSetWindowDsphidden();
	afx_msg void OnMenuProcessOperationCopy();
	afx_msg void OnMenuProcessOperationTeminate();
	afx_msg void OnMenuModuleOperationCopy();
	afx_msg void OnMenuThreadOperationCopy();
	afx_msg void OnMenuThreadOperationPause();
	afx_msg void OnMenuThreadOperationResume();
	afx_msg void OnMenuThreadOperationTeminate();
	afx_msg void OnMenuWindowOperationCopy();
	afx_msg void OnBnClickedOk();
	afx_msg void OnBnClickedCancel();
	afx_msg void OnNMClickListProcess(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnNMRclickListProcess(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnNMRclickListModule(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnNMRclickListThread(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnNMRclickListWindow(NMHDR *pNMHDR, LRESULT *pResult);

	DECLARE_MESSAGE_MAP()
};
